﻿// -----------------------------------------------------------------------
// <copyright file="IFace_Detection.cs" company="FCIS">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace FaceRecognition
{
    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using Emgu.CV;
    using Emgu.CV.Structure;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public interface IFace_Detection
    {
        /// <summary>
        /// check if camera connected or not
        /// if connected then it will capture img
        /// else connect the camera
        /// </summary>
        /// <returns>Frame that camera captured</returns>
        Image<Bgr, byte> Capture_Frame();

        /// <summary>
        /// Detect face 
        /// if there is no faces in the image return null
        /// else if no of faces =1 return it 
        /// else choose the closest person which has  the max bounding box then return it
        /// </summary>
        /// <param name="frame">take a frame to extract the faces from it</param>
        /// <param name="returned_frame">this frame for showing the user what camera capture after highlight the faces</param>
        /// <returns>Image that has the face detected in a grayed scale if it didn't find it return null</returns>
        Image Detect_Face(Image<Bgr, byte> frame, ref Image<Bgr, byte> returned_frame);

        /// <summary>
        /// it's the main function that call the others to get the final picture
        /// if no faces it return null
        /// otherwise it resize the face and return the final picture that will be used for feature extraction  
        /// </summary>
        /// <param name="size">size of resized face</param>
        /// <returns>Image that contain the final face in a gray scale and resized</returns>
        Image Get_User_Face(Size size);
    }
}
